RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] Header set content-security-Policy: upgrade-insecure-requests ){"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}